﻿<div class="tabbable">
<ul class="nav nav-tabs" id="myTab">
	<li class="active">
		<a data-toggle="tab" href="#tab1">
			备份数据库
		</a>
	</li>

	<li class="tab-red">
		<a data-toggle="tab" href="#tab2">
			还原数据库
		</a>
	</li>
</ul>

<div class="tab-content">
	<div id="tab1" class="tab-pane active">
		<form class="form">
			<div class="form-group clearfix form-bordered">
				<label class="control-label col-md-1">选择库</label>

				<div class="col-md-11">
					<div class="radio">
						<label>
							<input name="db_select" type="radio" value="all" checked>
							<span class="text">备份全部表</span>
						</label>
						<label>
							<input name="db_select" type="radio" value="custom">
							<span class="text">自定义备份</span>
						</label>
					</div>
					<div class="well  with-header">
						<h4 class="header bordered-palegreen bordered-bottom-1">选择要备份的表</h4>

						<div>
							<div class="checkbox">
								<?php
								foreach( $tables as $table ) {
									?>
									<label>
										<input type="checkbox" name="tables[]" value="<?= $table ?>">
										<span class="text"><?= $table ?></span>
									</label>
								<?php
								}
								?>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="form-group clearfix form-bordered">
				<label class="control-label col-md-1">备份文件名</label>

				<div class="col-md-11">
					<input type="text" name="filename" class="form-control" value="<?= date( 'YmdHis' ); ?>.sql">
				</div>
			</div>
			<div class="form-group clearfix form-bordered">
				<label class="control-label col-md-1">压缩</label>

				<div class="col-md-11">
					<div class="radio">
						<label>
							<input name="zip" type="radio" value="all" checked>
							<span class="text">不压缩</span>
						</label>
						<label>
							<input name="zip" type="radio" value="custom">
							<span class="text">ZIP压缩</span>
						</label>
					</div>
				</div>
			</div>
			<div class="form-group text-right clearfix">
				<button class="btn btn-success">备份</button>
				<button class="btn btn-default">取消</button>
			</div>
		</form>
	</div>

	<div id="tab2" class="tab-pane">

				<div role="grid" id="editabledatatable_wrapper" class="dataTables_wrapper form-inline no-footer">
					<table class="table table-striped table-hover table-bordered dataTable no-footer" id="editabledatatable" aria-describedby="editabledatatable_info">
						<thead class="bordered-bottom-1 bordered-orange">
						<tr>
							<th class="text-center">文件名</th>
							<th class="text-center">文件尺寸</th>
							<th class="text-center">文件类型</th>
							<th class="text-center">创建时间</th>
							<th class="text-center">操作</th>
						</tr>
						</thead>

						<tbody>
						<tr>
							<td class="text-center">20150618171828.sql</td>
							<td class="text-center">17.59 KB</td>
							<td class="text-center">sql</td>
							<td class="text-center">2015-06-18 17:18:28</td>
							<td class="text-center" style="width: 200px;">
								<a href="#" class="btn btn-info btn-xs edit"><i class="fa fa-repeat"></i> 还原</a>
								<a href="#" class="btn btn-danger btn-xs delete"><i class="fa fa-trash-o"></i> 删除</a>
								<a href="#" class="btn btn-maroon btn-xs "><i class="fa fa-download"></i> 下载</a>
							</td>
						</tr>
						</tbody>
					</table>
				</div>
		<div class="clearfix"></div>
	</div>
</div>
</div>